/*
 *  Copyright 2009 David Kuhn <david.s.kuhn at gmail.com>.
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *  under the License.
 */
package com.google.code.teamtools.domain;

import java.util.List;

/**
 * Interface to implement if an entity has skills.
 * 
 * @author David Kuhn
 */
public interface IHasSkills
{
	/**
     * Adds a skill to the person's repertoire of skills. If this is the
     * first skill to be added to the person then it will become the
     * primary by default.
     * 
     * @param skill
     *            the skill to add
     */
    void addSkill(ISkill skill);

    /**
     * Adds a skill to the person's repertoire of skills as the primary
     * skill.
     * 
     * @param skill
     *            the skill to add as primary
     */
    void addSkillAsPrimary(ISkill skill);
    
    /**
     * Returns the primary skill possessed by the person.
     * 
     * @return the primary skill
     */
    ISkill getPrimarySkill();
    
    /**
     * Returns the skills possessed by the person.
     * 
     * @return a <tt>List</tt> of skills
     */
    List<ISkill> getSkills();
    
    /**
     * Sets the primary skill. Skill must already exist (i.e. have been added to
     * the person) in order for it to be set as the primary skill. If this
     * skill hasn't already been added to the person consider using
     * {@link #addSkillAsPrimary(ISkill)}.
     * 
     * @param skill the skill to set as primary
     * @see #addSkillAsPrimary(ISkill)
     */
    void setPrimarySkill(ISkill skill);
}
